<?php

declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class CreateMultiBizTableMigration extends AbstractMigration
{
    /**
     * Change Method.
     *
     * Write your reversible migrations using this method.
     *
     * More information on writing migrations is available here:
     * https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
     *
     * Remember to call "create()" or "update()" and NOT "save()" when working
     * with the Table class.
     */
    public function change(): void
    {
        $this->table('multi_biz')
            ->addColumn('name', 'string', ['limit' => 32, 'null' => true,'comment'=>'总店名称'])
            ->addColumn('logo', 'string', ['limit' => 255, 'null' => true,'comment'=>'总店logo'])
            ->addColumn('phone', 'string', ['limit' => 16, 'null' => true,'comment'=>'总店电话'])
            ->addColumn('account', 'string', ['limit' => 32, 'null' => true,'comment'=>'总店账号'])
            ->addColumn('password', 'string', ['limit' => 64, 'null' => true,'comment'=>'总店密码'])
            ->addColumn('created_at', 'integer', ['limit' => 11, 'null' => true,'comment'=>'创建时间'])
            ->addColumn('updated_at', 'integer', ['limit' => 11, 'null' => true,'comment'=>'更新时间'])
            ->create();
    }
}
